import React from 'react'
import { Button, Tag } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import OperaPrompt from '../../../components/OperaPrompt'
import ProTable from '@ant-design/pro-table'
import request from '@/utils/request'
export default () => {


    const columns: any = [
        {
            title: '门店名称',
            dataIndex: 'title',
            width: "380px"
        },
        {
            title: '商家店铺',
            render: (text: any) => <Tag color="cyan">{text} </Tag>,
            dataIndex: 'store_title',
            hideInSearch: true,
            width: "360px"

        },
        {
            title: '地址',
            dataIndex: 'address',
            hideInSearch: true,
            width: "400px"
        },
        {
            title: '营业时间',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'when_business',
            hideInSearch: true,
        },
        {
            title: '创建时间',
            dataIndex: 'created_at',
            hideInSearch: true,
        },
    ];

    return (
        <PageHeaderWrapper title={false}>
            {/* <div style={{ padding: "0 10px" }}> */}
                <OperaPrompt dataList={[
                    "当前页面对门店的信息进行管理，可以添加门店，查看门店信息，状态信息等。",
                ]} />
            {/* </div> */}
            <ProTable<any>
                options={false}
                toolBarRender={false}
                headerTitle={null}
                rowKey="id"
                columns={columns}
                request={(params: any) => request('/store/offline-shop-list', {
                    params,
                })}
                tableAlertRender={false}
            />
        </PageHeaderWrapper>
    )
}